package org.zxp.designpattern.factory.simplefactory;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2019-08-20 16:58
 **/
public class SimpleFactoryTest {
    public static void main(String[] args) throws Exception {
        People man = PeopleFactory.getInstance(PeopleType.MAN);
        People women = PeopleFactory.getInstance(PeopleType.WOMEN);
        man.say();
        women.say();

        People taijian = PeopleFactory.getInstance(PeopleType.OTHER);
        taijian.say();
    }
}
